#include <iostream>
#include <queue>


int main()
{
std::priority_queue<int,std::vector<int>,std::greater<int>> q;
for(int i = 0;i < 10;i++)
{
    q.push(i+1);
}
while(!q.empty())
{
    std::cout<<q.top()<< " ";
    q.pop();
}
std::cout<<"\n";

}